package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.DTO.property.PropertyProjectRemoveUnitInfoDTO;
import com.itlong.cloud.POJO.PO.DeviceCloudIntercomBridgeInfoPO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      电梯归属信息持久层接口
 * </desc>
 *
 * @createDate 2017/9/22
 */
@Mapper
@Repository
public interface IDeviceCloudIntercomBridgeInfoDao extends IAbstractBaseDao<DeviceCloudIntercomBridgeInfoPO> {


    /**
     * <desc>
     *      添加云对讲归属信息
     * <desc/>
     * @param   params   bean转换层的map参数集
     * @return
     * @author Biao.R
     * @createDate 2017/9/21
     */
    Integer save(Map<String, Object> params);

    /**
     * <desc>
     *      批量添加云对讲归属信息
     * <desc/>
     * @param  params   bean转换层的map参数集
     * @return
     * @author Biao.R
     * @createDate 2017/9/22
     */
    Integer batchSave(List<Map<String, Object>> params);

    /**
     * <desc>
     *      获取设备地址
     * <desc/>
     * @param   deviceUnique    设备唯一码
     * @return
     * @author Biao.R
     * @createDate 2017/9/26
     */
    List<DeviceCloudIntercomBridgeInfoPO> getAddress(String deviceUnique);

    /**
     * <desc>
     *      根据id批量删除归属地信息
     * <desc/>
     * @param   delIdList    归属地id集
     * @return
     * @author Biao.R
     * @createDate 2017/9/26
     */
    Integer batchDeleteById(List<String> delIdList);


    /**
     * <desc>
     *      删除设备归属地址
     * <desc/>
     * @param   propertyProjectRemoveUnitInfoDTO  删除单元信息数据传输对象
     * @author Integer  返回删除数量
     * @createDate 2017/9/29
     */
    Integer deleteByAddress(PropertyProjectRemoveUnitInfoDTO propertyProjectRemoveUnitInfoDTO);

}
